package pers.cz.orm.dao.dialect;

import utils.DateUtils;

import java.util.Date;

/**
 * @program: jef-orm
 * @description: mysql方言
 * @author: Cheng Zhi
 * @create: 2023-08-12 17:44
 **/
public class MysqlDialect extends AbstractDialect{

    @Override
    public String toDbDate(Date value) {
        return "STR_TO_DATE('" + DateUtils.format((Date) value, "yyyy-MM-dd HH:mm:ss")+ "','%Y-%m-%d %H:%i:%s')";
    }

    @Override
    public String getDriveName() {
        return "com.mysql.jdbc.Driver";
    }
}
